﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BrewTarget.Units
{
    public class Mass : BaseUnit
    {
        public double Milligrams { get; set; }

        public Mass()
        {
            Milligrams = 0;
        }

        public double Grams
        {
            get { return Milligrams / 1000; }
            set { Milligrams = value * 1000; }
        }

        public double Kilograms
        {
            get { return Grams / 1000; }
            set { Grams = value * 1000; }
        }

        public double Ounces
        {
            get { return Grams / 28.3495231; }
            set { Grams = value * 28.3495231; }
        }

        public double Pounds
        {
            get { return Ounces / 16; }
            set { Ounces = value * 16; }
        }
    }
}
